<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>图书交易平台 - 注册</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}\style\style.css">
</head>
<body>
    <div class="container">
        <div class="left-side" role="presentation">
            <!-- 背景图片会通过 CSS 设置 -->
        </div>
        <div class="register-center">
            <div class="login-box">
                <h2>账号注册</h2>
                <form class="login-form" action="" method="POST">
                    <div class="input-group">
                        <input type="text"  name="username" required>
                        <label >用户名</label>
                    </div>
                    <div class="input-group">
                        <input type="email"  name="email" required>
                        <label >邮箱</label>
                    </div>
                    <div class="input-group">
                        <input type="text"  name="grade" required>
                        <label >年级</label>
                    </div>
                    <div class="input-group">
                        <input type="text"  name="class" required>
                        <label f>班级</label>
                    </div>
                    <div class="input-group">
                        <input type="text"  name="studentId" required>
                        <label >学号</label>
                    </div>

                    <%-- 显示错误信息 --%>
                    <% if(request.getAttribute("error") != null) { %>
                        <div class="error-message">
                            <%= request.getAttribute("error") %>
                        </div>
                    <% } %>
                    
                    <button type="submit">注册</button>
<%--                    <div class="register-link">--%>
<%--                        已有账号？<a href="login.jsp">返回登录</a>--%>
<%--                    </div>--%>
                </form>
            </div>
        </div>
    </div>
</body>
</html> 